package com.wmd102.opengldemo;

import android.opengl.GLSurfaceView;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

public class DMGLRender implements GLSurfaceView.Renderer {
    private NativeInterface mNativeInterface;

    public DMGLRender(NativeInterface nativeInterface){
        mNativeInterface = nativeInterface;
    }

    @Override
    public void onSurfaceCreated(GL10 gl10, EGLConfig eglConfig) {
        mNativeInterface.native_OnSurfaceCreated();
    }

    @Override
    public void onSurfaceChanged(GL10 gl10, int w, int h) {
        mNativeInterface.native_OnSurfaceChanged(w, h);
    }

    @Override
    public void onDrawFrame(GL10 gl10) {
        mNativeInterface.native_OnDrawFrame();
    }
}
